home *** CD-ROM | disk | FTP | other *** search
- Path: news.pix.za!usenet
- From: js000021@pixie.co.za (Smit JS)
- Newsgroups: comp.lang.c
- Subject: Re: printing graphics
- Date: Sat, 20 Jan 1996 06:19:15 GMT
- Organization: PiX - Proxima information X-change
- Message-ID: <4dqfhp$kb5@hawk.pix.za>
- References: <4dji10$qv8@walter.acs.nmu.edu>
- NNTP-Posting-Host: 196.23.60.108
- X-Newsreader: Forte Free Agent 1.0.82
-
- goose@scam.acs.nmu.edu (goose) wrote:
-
- >I have just written a program to graph simple functions and need a means
- >to take the graph and send it to the printer. Anyone have a clue as to
- >how this could be done.
-
- >Thanks in advance.
- >-goose
- Hi goose,
- Ja well you can run Graphics.com and do a printscreen, or you can
- consider that getpixel will return the colour of a pixel. That can be
- compared to the background colour, and if different, that pixel must
- be a 1 to the printer. To use the fputs function for output you also
- have to switch the stream to binary using the Dos ioctl function. I am
- assuming you are referring to a Dos machine,you don't say. The
- printer must be switched to raster grahics, and then consider that for
- a lot of printers, one char will print 8 dots vertically. You will
- need the printer control codes, and I sure would love to have a source
- for printer raster graphic control codes.
- I recommend "Bitmapped Graphics in C++" by Marv Luse.
- Regards,
- Johan Smit
- js000021@pixie.co.za
-
-